package com.icehand.common.exception;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author icehand
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class BaseException extends RuntimeException {
    private Integer errCode;

    public BaseException() {
        super();
    }

    public BaseException(String msg) {
        super(msg);
    }

    public BaseException(Integer errCode, String msg, Throwable throwable) {
        super(msg, throwable);
        this.errCode = errCode;
    }

    public BaseException(Integer errCode, String msg) {
        super(msg);
        this.errCode = errCode;
    }

    public BaseException(Integer errCode, String msg, Object... parameters) {
        super(String.format(msg, parameters));
        this.errCode = errCode;
    }
}
